All Functions of Week 8

theme_latex

{tinytable}

A theme for modelsummary/tinytable tables

head

{utils}

Show first 5 rows of a data frame

confint

{stats}

Calculate confidence Intervals for Model Parameters

read.csv

{utils}

Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters

print

{base}

Print object to the console

scale_y_continuous

{GGPLOT2}

Customise continuous y axis

replace

{base}

Replace elements in a vector

select

{dplyr}

Select columns from a tibble/data frame

write.csv

{utils}

write a csv file to a data frame

factor

{base}

Create a factor

element_blank

{GGPLOT2}

This theme element draws nothing, and assigns no space

summarise

{dplyr}

collapse the dataset to a summary statistic. Usually used with group_by()

modelsummary

{modelsummary}

Creates regression and data tables

coord_flip

{GGPLOT2}

Flip the x and y axes of a graph

colnames

{base}

Retrieve column names of a data frame

setwd

{base}

Set Working Directory

sum

{base}

Get sum of numeric values or a vector

reorder

{stats}

Reorder Levels of Factor based on the values of a second variable, usually numeric.

as.character

{base}

Coerce a vector to character

factor

{base}

Create factor variables

list

{base}

Create a list object

ls

{base}

Return a vector of character strings giving the names of the objects in the specified environment

plotPlane

{rockchalk}

Draw a 3-D regression plot for two predictors

subset

{base}

Return subsets of vectors, matrices or data frames which meet conditions.

element_text

{GGPLOT2}

Customise text in GGPLOT2

geom_smooth

{GGPLOT2}

Generates a smoothed conditional means curve / line

group_by

{dplyr}

Group tibble/data.frame by a factor variable. All further tidyverse operations are performed group-wise

recode

{dplyr}

Recode a variable

str

{utils}

Get the structure of an R object

with

{base}

evaluate expression in the context of a data frame

scale_color_discrete

{GGPLOT2}

Customise the discrete colour scale

c

{base}

Combine values/vectors into a vector

aes

{GGPLOT2}

Construct aesthetic mapping of a ggplot graph

geom_point

{GGPLOT2}

Generates a scatter plot

ylab

{GGPLOT2}

Label the y axis (ggplot)

library

{base}

Load an R package

arrange

{dplyr}

Sort values of data frame according to a variable/combination of variables

theme

{GGPLOT2}

Customize ggplot themes

geom_histogram

{GGPLOT2}

Generates a histogram

xlab

{GGPLOT2}

Label the x axis (ggplot)

scale_x_continuous

{GGPLOT2}

Customise continuous x axis

summary

{base}

Obtain summary statistics or detailed regression output

quantile

{stats}

Obtain empirical quantiles of a vector

lm

{stats}

Fit linear models using least squares

as.numeric

{base}

Coerce a vector to numeric

group_tt

{tinytable}

Grouping in tinytable

geom_bar

{GGPLOT2}

Generates a bar chart

filter

{dplyr}

Filter out rows of a data frame according to logical vector

ggplot

{GGPLOT2}

Create a ggplot graph

which

{base}

return indexes of TRUE entries of a logical vector

rm

{base}

Remove objects

mutate

{dplyr}

Create new variables

data.frame

{base}

Create a data.frame from vectors

theme_classic

{GGPLOT2}

A minimalistic theme with no gridlines

margin

{GGPLOT2}

Set margins around plot elements (used inside theme elements)

is.na

{base}

Check if a value is NA/elements of vector are NA

order

{base}

Get indexes that will sort a vector

table

{base}

Obtain frequency table of a variable/cross-tabulation of two variables

read_csv

{readr}

Read CSV files

predict

{stats}

Generate predicted values from model objects

after_stat

{GGPLOT2}

Control aesthetic evaluation. On the module used for displying percent

The end!